package com.wakey.rtcs.miniui;

import java.util.List;

/**
 * MiniPageManager，向前台返回Grid分页信息及数据
 */
public class PageManager<T> {
    //记录总数
    private Integer total;
    // 页码
    private Integer pageIndex;
    // 每页条数
    private Integer pageSize;
    // 排序字段
    private String sortField;
    // 排序方式
    private String sortOrder;
    //记录集合
    private List<T> data;

    /**
     * 构造函数
     */
    public PageManager() {
        this.total = 0;
        this.data = null;
    }

    /**
     * 构造函数
     *
     * @param total 记录总数
     * @param data  记录集合
     */
    public PageManager(int total, List<T> data) {
        this.total = total;
        this.data = data;
    }

    public Integer getTotal() {
        return total;
    }

    public void setTotal(Integer total) {
        this.total = total;
    }

    public Integer getPageIndex() {
        return pageIndex;
    }

    public void setPageIndex(Integer pageIndex) {
        this.pageIndex = pageIndex;
    }

    public Integer getPageSize() {
        return pageSize;
    }

    public void setPageSize(Integer pageSize) {
        this.pageSize = pageSize;
    }

    public String getSortField() {
        return sortField;
    }

    public void setSortField(String sortField) {
        this.sortField = sortField;
    }

    public String getSortOrder() {
        return sortOrder;
    }

    public void setSortOrder(String sortOrder) {
        this.sortOrder = sortOrder;
    }

    public List<T> getData() {
        return data;
    }

    public void setData(List<T> data) {
        this.data = data;
    }
}
